Skip to content

nl_l3: also compare prefix length in duplicate route check#490

Merged
rubensfig merged 1 commit into
mainfrom
jogo_fix_frr_dupe_check
Jul 15, 2026
Merged

nl_l3: also compare prefix length in duplicate route check#490
rubensfig merged 1 commit into
mainfrom
jogo_fix_frr_dupe_check

Conversation

@KanjiMonster

@KanjiMonster KanjiMonster commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

When checking for duplicate routes, we also need to check the prefix lengths, else e.g. a route 10.0.0.0/8 will match with a 10.0.10.0/24 route. This can lead to routes falsely being identified as duplicates and not added or removed as expected.

So switch from nl_addr_cmp_prefix() to nl_addr_cmp() to ensure that different prefix lengths will be treated as different routes.

Fixes: 96e14a8 ("nl_l3: ignore duplicated link routes from FRR")

When checking for duplicate routes, we also need to check the prefix
lengths, else e.g. a route 10.0.0.0/8 will match with a 10.0.10.0/24
route. This can lead to routes falsely being identified as duplicates
and not added or removed as expected.

So switch from nl_addr_cmp_prefix() to nl_addr_cmp() to ensure that
different prefix lengths will be treated as different routes.

Fixes: 96e14a8 ("nl_l3: ignore duplicated link routes from FRR")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@rubensfig
rubensfig merged commit d87ec2c into main Jul 15, 2026
4 checks passed
@rubensfig
rubensfig deleted the jogo_fix_frr_dupe_check branch July 15, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants